package com.weitu.environmental.basicInfo.service.impl;

import com.weitu.environmental.basicInfo.entity.MonitorProject;
import com.weitu.environmental.basicInfo.entity.Sw;
import com.weitu.environmental.basicInfo.mapper.MonitorProjectMapper;
import com.weitu.environmental.basicInfo.mapper.SwMapper;
import com.weitu.environmental.basicInfo.service.MonitorProjectService;
import com.weitu.environmental.basicInfo.service.SwService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * @author zhangqingxi 2017-03-31
 */
@Service
public class MonitorProjectServiceImpl implements MonitorProjectService {

    private final MonitorProjectMapper monitorProjectMapper;

    @Autowired
    public MonitorProjectServiceImpl(MonitorProjectMapper monitorProjectMapper) {
        this.monitorProjectMapper = monitorProjectMapper;
    }

    @Override
    public List<MonitorProject> findByParam(Map paramMap) {
        return monitorProjectMapper.findByParam(paramMap);
    }


    @Override
    public Integer findByParamCount(Map paramMap) {
        return monitorProjectMapper.findByParamCount(paramMap);
    }

    @Override
    public MonitorProject findById(String id) {
        return monitorProjectMapper.findById(id);
    }

    @Override
    public List<Map> findAll() {
        return monitorProjectMapper.findAll();
    }

    @Transactional
    @Override
    public Integer add(Map paramMap) {
        return monitorProjectMapper.add(paramMap);
    }

    @Transactional
    @Override
    public Integer updateById(Map paramMap) {
        return monitorProjectMapper.updateById(paramMap);
    }


}
